# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kimagemapeditor
pkgver=20.04.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# mips, ppc64le and s390x blocked by qt5-qtwebengine
arch="all !ppc64le !s390x !armhf !mips !mips64"
url="https://kde.org/applications/development/org.kde.kimagemapeditor"
pkgdesc="An editor of image maps embedded inside HTML files, based on the <map> tag"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtwebengine-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev kdbusaddons-dev kdoctools-dev kguiaddons-dev kiconthemes-dev khtml-dev kparts-dev ki18n-dev kwidgetsaddons-dev kxmlgui-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kimagemapeditor-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="a10032011c2eec6a7e7718dfe60c7b1c5dedc0db2cb2c3dd40ba6c5ba515a916c2c7fd62e79d0ca4044a050970071d8deb5c43baff5503a548548cad045f618b  kimagemapeditor-20.04.3.tar.xz"
